import java.util.Arrays;
import java.util.Scanner;

public class Homework6 {

	public static void main(String[] args) {
		String[] fruits = new String[5];
		Scanner sc = new Scanner(System.in);

		for (int i = 0; i < fruits.length; i++) {
			System.out.print("请输入第" + (i + 1) + "个水果的英文名字:");
			fruits[i] = sc.next();
		}
		Arrays.sort(fruits);
		for (int i = 0; i < fruits.length; i++) {
			System.out.println("第" + (i + 1) + "个水果名字为" + fruits[i]);
		}

	}

}
